package com.java.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.java.entity.Money;

import com.java.mapper.MoneyMapper;
import com.java.service.MoneyService;

@Service("MoneyServiceImpl")
public class MoneyServiceImpl implements MoneyService {

	@Autowired
	private MoneyMapper mm;

	@Override
	public int insert(Money money) {

		return mm.insertSelective(money);
	}

	@Override
	public int update(Money money) {
		// TODO Auto-generated method stub
		return mm.updateByPrimaryKeySelective(money);
	}

	
	
	
	@Override
	public List<Money> all() {
		
		return mm.all();
	}

	@Override
	public Money selectById(Integer id) {
		// TODO Auto-generated method stub
		return mm.selectByPrimaryKey(id);
	}

}
